/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004-2005 ActivMedia Robotics LLC
Copyright (C) 2006-2010 MobileRobots Inc.
Copyright (C) 2011-2015 Adept Technology, Inc.
Copyright (C) 2016-2018 Omron Adept Technologies, Inc.

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

If you wish to redistribute ARIA under different terms, contact 
Adept MobileRobots for information about a commercial version of ARIA at 
robots@mobilerobots.com or 
Adept MobileRobots, 10 Columbia Drive, Amherst, NH 03031; +1-603-881-7960
*/
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.8
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.mobilerobots.Aria;

public class ArArg {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  public ArArg(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(ArArg obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        AriaJavaJNI.delete_ArArg(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public ArArg() {
    this(AriaJavaJNI.new_ArArg__SWIG_0(), true);
  }

  public ArArg(String name, SWIGTYPE_p_int pointer, String description, int minInt, int maxInt) {
    this(AriaJavaJNI.new_ArArg__SWIG_1(name, SWIGTYPE_p_int.getCPtr(pointer), description, minInt, maxInt), true);
  }

  public ArArg(String name, SWIGTYPE_p_int pointer, String description, int minInt) {
    this(AriaJavaJNI.new_ArArg__SWIG_2(name, SWIGTYPE_p_int.getCPtr(pointer), description, minInt), true);
  }

  public ArArg(String name, SWIGTYPE_p_int pointer, String description) {
    this(AriaJavaJNI.new_ArArg__SWIG_3(name, SWIGTYPE_p_int.getCPtr(pointer), description), true);
  }

  public ArArg(String name, SWIGTYPE_p_int pointer) {
    this(AriaJavaJNI.new_ArArg__SWIG_4(name, SWIGTYPE_p_int.getCPtr(pointer)), true);
  }

  public ArArg(String name, SWIGTYPE_p_double pointer, String description, double minDouble, double maxDouble) {
    this(AriaJavaJNI.new_ArArg__SWIG_5(name, SWIGTYPE_p_double.getCPtr(pointer), description, minDouble, maxDouble), true);
  }

  public ArArg(String name, SWIGTYPE_p_double pointer, String description, double minDouble) {
    this(AriaJavaJNI.new_ArArg__SWIG_6(name, SWIGTYPE_p_double.getCPtr(pointer), description, minDouble), true);
  }

  public ArArg(String name, SWIGTYPE_p_double pointer, String description) {
    this(AriaJavaJNI.new_ArArg__SWIG_7(name, SWIGTYPE_p_double.getCPtr(pointer), description), true);
  }

  public ArArg(String name, SWIGTYPE_p_double pointer) {
    this(AriaJavaJNI.new_ArArg__SWIG_8(name, SWIGTYPE_p_double.getCPtr(pointer)), true);
  }

  public ArArg(String name, SWIGTYPE_p_bool pointer, String description) {
    this(AriaJavaJNI.new_ArArg__SWIG_9(name, SWIGTYPE_p_bool.getCPtr(pointer), description), true);
  }

  public ArArg(String name, SWIGTYPE_p_bool pointer) {
    this(AriaJavaJNI.new_ArArg__SWIG_10(name, SWIGTYPE_p_bool.getCPtr(pointer)), true);
  }

  public ArArg(String name, ArPose pointer, String description) {
    this(AriaJavaJNI.new_ArArg__SWIG_11(name, ArPose.getCPtr(pointer), pointer, description), true);
  }

  public ArArg(String name, ArPose pointer) {
    this(AriaJavaJNI.new_ArArg__SWIG_12(name, ArPose.getCPtr(pointer), pointer), true);
  }

  public ArArg(String name, String pointer, String description, long maxStrLen) {
    this(AriaJavaJNI.new_ArArg__SWIG_13(name, pointer, description, maxStrLen), true);
  }

  public ArArg(String name, ArRetFunctor1_Bool_ArgumentBuilderP setFunctor, SWIGTYPE_p_ArRetFunctorT_std__listT_ArArgumentBuilder_p_t_const_p_t getFunctor, String description) {
    this(AriaJavaJNI.new_ArArg__SWIG_14(name, ArRetFunctor1_Bool_ArgumentBuilderP.getCPtr(setFunctor), setFunctor, SWIGTYPE_p_ArRetFunctorT_std__listT_ArArgumentBuilder_p_t_const_p_t.getCPtr(getFunctor), description), true);
  }

  public ArArg(String description) {
    this(AriaJavaJNI.new_ArArg__SWIG_15(description), true);
  }

  public ArArg(ArArg arg) {
    this(AriaJavaJNI.new_ArArg__SWIG_16(ArArg.getCPtr(arg), arg), true);
  }

  public ArArg.Type getType() {
    return ArArg.Type.swigToEnum(AriaJavaJNI.ArArg_getType(swigCPtr, this));
  }

  public String getName() {
    return AriaJavaJNI.ArArg_getName(swigCPtr, this);
  }

  public String getDescription() {
    return AriaJavaJNI.ArArg_getDescription(swigCPtr, this);
  }

  public boolean setInt(int val) {
    return AriaJavaJNI.ArArg_setInt(swigCPtr, this, val);
  }

  public boolean setDouble(double val) {
    return AriaJavaJNI.ArArg_setDouble(swigCPtr, this, val);
  }

  public boolean setBool(boolean val) {
    return AriaJavaJNI.ArArg_setBool(swigCPtr, this, val);
  }

  public boolean setPose(ArPose pose) {
    return AriaJavaJNI.ArArg_setPose(swigCPtr, this, ArPose.getCPtr(pose), pose);
  }

  public boolean setString(String str) {
    return AriaJavaJNI.ArArg_setString(swigCPtr, this, str);
  }

  public boolean setArgWithFunctor(ArArgumentBuilder argument) {
    return AriaJavaJNI.ArArg_setArgWithFunctor(swigCPtr, this, ArArgumentBuilder.getCPtr(argument), argument);
  }

  public int getInt() {
    return AriaJavaJNI.ArArg_getInt(swigCPtr, this);
  }

  public double getDouble() {
    return AriaJavaJNI.ArArg_getDouble(swigCPtr, this);
  }

  public boolean getBool() {
    return AriaJavaJNI.ArArg_getBool(swigCPtr, this);
  }

  public ArPose getPose() {
    return new ArPose(AriaJavaJNI.ArArg_getPose(swigCPtr, this), true);
  }

  public String getString() {
    return AriaJavaJNI.ArArg_getString(swigCPtr, this);
  }

  public ArArgumentBuilderPtrList getArgsWithFunctor() {
    long cPtr = AriaJavaJNI.ArArg_getArgsWithFunctor(swigCPtr, this);
    return (cPtr == 0) ? null : new ArArgumentBuilderPtrList(cPtr, false);
  }

  public void log() {
    AriaJavaJNI.ArArg_log(swigCPtr, this);
  }

  public int getMinInt() {
    return AriaJavaJNI.ArArg_getMinInt(swigCPtr, this);
  }

  public int getMaxInt() {
    return AriaJavaJNI.ArArg_getMaxInt(swigCPtr, this);
  }

  public double getMinDouble() {
    return AriaJavaJNI.ArArg_getMinDouble(swigCPtr, this);
  }

  public double getMaxDouble() {
    return AriaJavaJNI.ArArg_getMaxDouble(swigCPtr, this);
  }

  public boolean getConfigPrioritySet() {
    return AriaJavaJNI.ArArg_getConfigPrioritySet(swigCPtr, this);
  }

  public ArPriority.Priority getConfigPriority() {
    return ArPriority.Priority.swigToEnum(AriaJavaJNI.ArArg_getConfigPriority(swigCPtr, this));
  }

  public void setConfigPriority(ArPriority.Priority priority) {
    AriaJavaJNI.ArArg_setConfigPriority(swigCPtr, this, priority.swigValue());
  }

  public final static class Type {
    public final static ArArg.Type INVALID = new ArArg.Type("INVALID");
    public final static ArArg.Type INT = new ArArg.Type("INT");
    public final static ArArg.Type DOUBLE = new ArArg.Type("DOUBLE");
    public final static ArArg.Type STRING = new ArArg.Type("STRING");
    public final static ArArg.Type BOOL = new ArArg.Type("BOOL");
    public final static ArArg.Type POSE = new ArArg.Type("POSE");
    public final static ArArg.Type FUNCTOR = new ArArg.Type("FUNCTOR");
    public final static ArArg.Type DESCRIPTION_HOLDER = new ArArg.Type("DESCRIPTION_HOLDER");
    public final static ArArg.Type LAST_TYPE = new ArArg.Type("LAST_TYPE", AriaJavaJNI.ArArg_LAST_TYPE_get());

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static Type swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + Type.class + " with value " + swigValue);
    }

    private Type(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private Type(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private Type(String swigName, Type swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static Type[] swigValues = { INVALID, INT, DOUBLE, STRING, BOOL, POSE, FUNCTOR, DESCRIPTION_HOLDER, LAST_TYPE };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static int TYPE_COUNT = AriaJavaJNI.ArArg_TYPE_COUNT_get();

}
